/*************************************************
Author: tony
Date: 7/22/2013
Description:
Notes: 
*************************************************/

#ifndef __cmdqqmall_h__
#define __cmdqqmall_h__

#include "../maindef.h"
#include "commclass.h"
#include "PBMsgHead.pb.h"
#include "MsgQQMall.pb.h"

class CMainCtrl;
class CCmdQQMall : public CTAsyncCmd
{
public:	
    enum  MALL_OPT_TYPE
    {
        MALL_OPT_QQ = 2,
        MALL_OPT_OWN = 3,
    };

    CCmdQQMall ()
    {
        _iMaxNum = 99;
        _iBuyNum = 0;
        _uiGoodsID = 0;
        _iTotalPirce = 0;
    }

    virtual int Do(void* pData);
    virtual int AnsClients(int iRet);
    virtual int CallBack(int iRet);
    virtual int LogicDo(int iRet);

    CMainCtrl* pstMainCtrl;
    PBMsgHead  stMsgHead;
    CEnpNetHead stEnpHead;

    MsgReqQQMall stReq;
    MsgAnsQQMall stAns;

    unsigned int uiGID;

private:
    int PreCheckBeforBuy (CPlayerOnlineData & stPlayerOnlineData, CPlayerBaseInfo & stPlayerBaseInfo, CPlayerDetailInfoEx1 & stPlayerDetailInfoEx1);

    int  _iMaxNum;
    int _iBuyNum;
    unsigned int _uiGoodsID;
    int _iTotalPirce;
};


#endif // __cmdqqmall_h__

